<script lang="ts" setup>
import { getListByConditions, urls } from '@/index';
import type { User } from '@/index.d';
import { useRequest } from 'vue-request';

const getUsersPromise = () => getListByConditions<User>(urls.user, {});

const { data } = useRequest(getUsersPromise);
</script>
<template>
  <el-option
    v-for="item in data"
    :key="item.id"
    :label="item.name"
    :value="item.id as number"
    v-bind="$attrs"
  />
</template>
